<!--
 * @Author: xiezhiquan3878
 * @LastEditors: xiezhiquan3878 xiezhiquan3878
 * @Date: 2024-07-2 15:17:22
 * @LastEditTime: 2024-07-2 17:22:59
 * @Description: 日期范围选择器
-->
<template>
  <div class="days-time">
    <el-date-picker
      v-model="days"
      type="daterange"
      align="right"
      unlink-panels
      size="small"
      range-separator="至"
      start-placeholder="开始日期"
      end-placeholder="结束日期"
      value-format="yyyy/MM/dd"
      format="yyyy/MM/dd"
      popper-class="date-style"
    />
  </div>
</template>

<script>
export default {
  props: {
    value: null
  },
  data() {
    return {
      days: []
    }
  },
  watch: {
    value: {
      handler(val) {
        this.days = val
      },
      deep: true,
      immediate: true
    },
    days: {
      handler(val) {
        this.$emit('input', val)
      },
      deep: true,
      immediate: true
    }
  },
  created() {},
  methods: {}
}
</script>

<style lang="scss" scoped></style>
